package com.xjy.headfirst.模板方法模式;

import java.util.Arrays;

/**
 * decription:
 *
 * @author 辛纪元
 * @since 2022-07-14
 */

public class Test {

    public static void main(String[] args) {
        Tea tea = new Tea();
        tea.preparRecipe();

//        Duck[] ducks = {
//                new Duck("jy",2),
//                new Duck("Xjy",1),
//                new Duck("temp",3)
//        };
//        System.out.println("\nbefore");
//        display(ducks);
//        Arrays.sort(ducks);
//        System.out.println("end");
//        display(ducks);

    }

    public static void display(Duck[] ducks){
        for (int i = 0; i < ducks.length; i++) {
            System.out.println(ducks[i]);
        }
    }

}
